<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        img{
            background-image: url();
        }
    </style>
</head>
<body>
        <img src="images/beijing/1.jpeg" alt="">
        <img src="images/beijing/2.jpeg" alt="">
        <img src="images/beijing/3.jpeg" alt="">
        <img src="images/beijing/4.jpeg" alt="">
        <img src="images/beijing/5.jpeg" alt="">

        <script type="text/javascript">
            var imglist = document.getElementsByTagName("img");
            
            for(var i = 0,count = 0;i<imglist.length;i++)
            {
                imglist[i].onload = function(){
                    count++;
                    if(count == imglist.length)
                    {
                        alert("图片加载完毕！");
                    }
                }
            }
        </script>
</body>
</html>